#!/bin/sh

export HISTSIZE=51200

export LESS=-MRiqscj5
export PAGER=less
#export GREP_OPTIONS="--binary-files=without-match"

[ -z "$USER" ] && export USER="$(id -nu)"

[ -z "$HOME" -o "$HOME" = "/" ] && export HOME="/home/$USER"

export PATH=$HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:"$PATH":/usr/lib/xscreensaver

. $HOME/bin/checkpath &>/dev/null


if [[ -n $SSH_CONNECTION || $TERM = 'linux' ]]; then
	export LANG=C
fi

if [[ -n $DISPLAY ]]; then
	export LANG=zh_CN.GBK
fi

if [[ $LANG != 'zh_CN.UTF-8' ]]; then
	export LESSCHARSET=latin1
fi
